import Utils from '@/utils'
const getters = {
  loginInfo: state => {
    return state.Business.loginInfo
  },
  // 选中商家
  selectBusiness: state => {
    const stateSelectBusiness = state.Business.selectBusiness
    const stateLoginInfo = state.Business.loginInfo

    const ifSelectBusiness = stateSelectBusiness || Utils.format(stateLoginInfo, 'selectuniacid')
    if (!ifSelectBusiness) return null

    return state.Business.selectBusiness || stateLoginInfo || null
  },
  // 是否显示扫码点单
  ifScan: state => {
    return state.Business.ifScan
  }
}

export default getters
